package cn.shanke.torrentmanagerserver.model;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

@Data
public class Torrent {

    public static final String STATUS_UNLINK = "unlink";   // 未联结
    public static final String STATUS_LINKING = "linking"; // 联结中
    public static final String STATUS_LINKED = "linked";   // 已联结

    @TableId(type = IdType.AUTO)
    private Long id;
    @TableField(updateStrategy= FieldStrategy.NOT_NULL)
    private Long addtime;
    private String name;
    private String address;
    private String torrentFile;
    private Long siteid;
    private Long categoryid;
    private Long clientid;
    private String description;
    private String status;

    //
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String btid;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String hashString;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String btname;
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String linkDir;

    @TableField(exist = false)
    private boolean startOnAdd = false;
    @TableField(exist = false)
    private boolean startNow = false;
    @TableField(exist = false)
    private boolean enableSiteFolder = false;
    @TableField(exist = false)
    private boolean enableCategoryFolder = false;
}
